﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.Design;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace TCPClient.UI.UserControls
{
    [Designer("System.Windows.Forms.Design.ParentControlDesigner, System.Design", typeof(IDesigner))]
    public partial class DaysLabelsUserControl : UserControl
    {
        private List<OneDayLabelUserControl> m_LabelsControls = new List<OneDayLabelUserControl>(7); 
        public DaysLabelsUserControl()
        {
            InitializeComponent();
            initList();
        }

        private void initList()
        {
            oneDayLabelUserControlSunday.DayLabel.Text = "Sunday";
            m_LabelsControls.Add(this.oneDayLabelUserControlSunday);
            oneDayLabelUserControlSunday.DayLabel.Text = "Monday";
            m_LabelsControls.Add(this.oneDayLabelUserControlMonday);
            oneDayLabelUserControlSunday.DayLabel.Text = "Tuesday";
            m_LabelsControls.Add(this.oneDayLabelUserControlTuesday);
            oneDayLabelUserControlSunday.DayLabel.Text = "Wednesday";
            m_LabelsControls.Add(this.oneDayLabelUserControlWednesday);
            oneDayLabelUserControlSunday.DayLabel.Text = "Thursday";
            m_LabelsControls.Add(this.oneDayLabelUserControlThursday);
            oneDayLabelUserControlSunday.DayLabel.Text = "Friday";
            m_LabelsControls.Add(this.oneDayLabelUserControlFriday);
            oneDayLabelUserControlSunday.DayLabel.Text = "Saturday";
            m_LabelsControls.Add(this.oneDayLabelUserControlSatueday);
            oneDayLabelUserControlZereg.Visible = false;
            m_LabelsControls.Add(this.oneDayLabelUserControlZereg);
        }

        public void SetLabelOfText(int index, string date)
        {
            this.m_LabelsControls[index].DayLabel.Text = date;
        }
        
    }
}
